package com.itbaizhan;

import com.itbaizhan.domain.Student;
import com.itbaizhan.service.StudentService;

/*在配置文件中修改value值 ，即接口，不用修改原代码，就可以用新方法*/
public class Test {
    public static void main(String[] args) {
        //service 也可以用容器代替
        //StudentService studentService = new StudentService();
        StudentService studentService = (StudentService) Container.getBean("studentService");
        Student studentById = studentService.findStudentById(1);
        System.out.println(studentById);
        Student studentById2 = studentService.findStudentById(1);
        System.out.println(studentById2);
    }
}
